import { createApp } from 'vue'
//import { createPinia } from 'pinia'
import router from './router'
import ElementPlus from 'element-plus'
import locale from 'element-plus/es/locale/lang/zh-cn';
import { hiPrintPlugin } from 'vue-plugin-hiprint';
import elementIcons from '@/components/SvgIcon/svgicon'; //引入全部element图标
import 'element-plus/dist/index.css'
//import './style.css'
import "@/assets/css/global.scss";
import "@/assets/css/alex.scss";
import './mock';//立即执行
import './stores';//立即执行
import App from './App.vue'
import { useDict } from '@/utils/dict';
import directive from './directive'; // 按钮权限
import {
  parseTime,
  resetForm,
  selectDictLabel
} from '@/utils/common';
import { download } from '@/request/request';
const app = createApp(App)
// 全局方法挂载
app.config.globalProperties.parseTime = parseTime;
app.config.globalProperties.resetForm = resetForm;
app.config.globalProperties.useDict = useDict;
app.config.globalProperties.selectDictLabel = selectDictLabel;
app.config.globalProperties.download = download;

// 字典标签组件
import DictTag from '@/components/DictTag/index.vue';
// 全局组件挂载
app.component('DictTag', DictTag);

directive(app); //自定义按钮权限

app.use(hiPrintPlugin, '$pluginName');
hiPrintPlugin.disAutoConnect(); // 取消自动连接
//app.use(createPinia())
app.use(router)
app.use(ElementPlus,{
      locale: locale,
})
app.use(elementIcons);
app.mount('#app')

import './permission'; 
